/**@package     Joomla.Site * @subpackage  Templates.protostar * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. * @license     GNU General Public License version 2 or later; see LICENSE.txt * @since       3.2*/
(function($){	
$(document).ready(function(){				
	$('*[rel=tooltip]').tooltip();		
	$('.radio.btn-group label').addClass('btn');		
	$(".btn-group label:not(.active)").click(function(){			
		var label = $(this);			
		var input = $('#' + label.attr('for'));			
		if (!input.prop('checked')) {				
			label.closest('.btn-group').find("label").removeClass('active btn-success btn-danger btn-primary');				
			if (input.val() == '') {label.addClass('active btn-primary');}				
			else 	if (input.val() == 0) {label.addClass('active btn-danger');}				
					else {label.addClass('active btn-success');}				
			input.prop('checked', true);		
		}		
	});		
	$(".btn-group input[checked=checked]").each(function(){			if ($(this).val() == '') {$("label[for=" + $(this).attr('id') + "]").addClass('active btn-primary');} 			else if ($(this).val() == 0) {$("label[for=" + $(this).attr('id') + "]").addClass('active btn-danger');} 			else {$("label[for=" + $(this).attr('id') + "]").addClass('active btn-success');}		});	})})(jQuery);function readmore0(){	jQuery("html, body").animate({ scrollTop: (jQuery('#offers').offset().top)-0}, 1000);	$(".popup").hide();	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupreadmore0");$popup1.css("top", "3%");$popup1.css("left","3%");$popup1.css("zIndex","99999");$popup1.fadeIn();
}
function readmore1(){	jQuery("html, body").animate({ scrollTop: (jQuery('#offers').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;	var dheight = $(document).height();	var dwidth = document.body.clientWidth;	$("#background").width(dwidth).height(dheight);	$("#background").fadeTo("slow",0.8);	var $popup1=$("#popupreadmore1");$popup1.css("top", "3%");$popup1.css("left","3%");$popup1.css("zIndex","99999");$popup1.fadeIn();}function readmore2(){	jQuery("html, body").animate({ scrollTop: (jQuery('#offers').offset().top)-0}, 1000);	$(".popup").hide();	var dheightpopup = document.body.clientHeight;	var dheight = $(document).height();	var dwidth = document.body.clientWidth;	$("#background").width(dwidth).height(dheight);	$("#background").fadeTo("slow",0.8);	var $popup1=$("#popupreadmore2");$popup1.css("top", "3%");$popup1.css("left","3%");$popup1.css("zIndex","99999");$popup1.fadeIn();}function readmore3(){	jQuery("html, body").animate({ scrollTop: (jQuery('#offers').offset().top)-0}, 1000);	$(".popup").hide();	var dheightpopup = document.body.clientHeight;	var dheight = $(document).height();	var dwidth = document.body.clientWidth;	$("#background").width(dwidth).height(dheight);	$("#background").fadeTo("slow",0.8);	var $popup1=$("#popupreadmore3");$popup1.css("top", "3%");$popup1.css("left","3%");$popup1.css("zIndex","99999");$popup1.fadeIn();}function readmore4(){	jQuery("html, body").animate({ scrollTop: (jQuery('#offers').offset().top)-0}, 1000);	$(".popup").hide();	var dheightpopup = document.body.clientHeight;	var dheight = $(document).height();	var dwidth = document.body.clientWidth;	$("#background").width(dwidth).height(dheight);	$("#background").fadeTo("slow",0.8);	var $popup1=$("#popupreadmore4");$popup1.css("top", "3%");$popup1.css("left","3%");$popup1.css("zIndex","99999");$popup1.fadeIn();}
function readmore5(){	jQuery("html, body").animate({ scrollTop: (jQuery('#offers').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupreadmore5");$popup1.css("top", "3%");$popup1.css("left","3%");$popup1.css("zIndex","99999");$popup1.fadeIn();
}
function readmore6(){	jQuery("html, body").animate({ scrollTop: (jQuery('#offers').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupreadmore6");$popup1.css("top", "3%");$popup1.css("left","3%");$popup1.css("zIndex","99999");$popup1.fadeIn();
}
function readmore7(){	jQuery("html, body").animate({ scrollTop: (jQuery('#offers').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupreadmore7");$popup1.css("top", "3%");$popup1.css("left","3%");$popup1.css("zIndex","99999");$popup1.fadeIn();
}
function readmore8(){	jQuery("html, body").animate({ scrollTop: (jQuery('#offers').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupreadmore8");$popup1.css("top", "3%");$popup1.css("left","3%");$popup1.css("zIndex","99999");$popup1.fadeIn();
}
function readmore9(){	jQuery("html, body").animate({ scrollTop: (jQuery('#offers').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupreadmore9");$popup1.css("top", "3%");$popup1.css("left","3%");$popup1.css("zIndex","99999");$popup1.fadeIn();
}
function readmore10(){	jQuery("html, body").animate({ scrollTop: (jQuery('#offers').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupreadmore10");$popup1.css("top", "3%");$popup1.css("left","3%");$popup1.css("zIndex","99999");$popup1.fadeIn();
}
function readmoreproperties0(){	
	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties0");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties1(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties1");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties2(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties2");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties3(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties3");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties4(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties4");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties5(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties5");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties6(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties6");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties7(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties7");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties8(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties8");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties9(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties9");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties10(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties10");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties11(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties11");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties12(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties12");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties13(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties13");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties14(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties14");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties15(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties15");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties16(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties16");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties17(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties17");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties18(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties18");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties19(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties19");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties20(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties20");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties21(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties21");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function readmoreproperties22(){	jQuery("html, body").animate({ scrollTop: (jQuery('#contactus').offset().top)-0}, 1000);
	$(".popup").hide();
	var dheightpopup = document.body.clientHeight;
	var dheight = $(document).height();
	var dwidth = document.body.clientWidth;
	$("#background").width(dwidth).height(dheight);
	$("#background").fadeTo("slow",0.8);
	var $popup1=$("#popupproperties22");$popup1.css("top", "3%");$popup1.css("left","10%");$popup1.fadeIn();
}
function closePopup(){$("#background").fadeOut();$(".popup").hide();}
jQuery(document).ready(function($) {
    if ($('#map-div').length != 0  ) {
        var streetaddress   = $('#map-div').data('addr'),
            lt              = $('#map-div').data('lt'),
            lg              = $('#map-div').data('lg'),
            zoom            = $('#map-div').data('zoom'),
            mapsIcon        = $('#map-div').data('icon'),
            geocoder,styledMap,myLatlng,
            MPstyles        = [{
                                stylers: [
                                    { hue: '#fff' },
                                    { saturation: -100 }
                                ]},{
                                featureType: "road",
                                elementType: "geometry",
                                stylers: [
                                    { lightness: 0}
                                ]},{
                                    featureType: "road",
                                    elementType: "labels"
                                }];
        if ( lt == "" ||  lg == ""){
            geocoder        = new google.maps.Geocoder();
            styledMap       = new google.maps.StyledMapType(MPstyles,{name: "Styled Map"});
            geocoder.geocode( { 'address': streetaddress}, function(results, status) {
                if (status == google.maps.GeocoderStatus.OK) {
                    var mapOptions = { 
                            zoom: zoom, 
                            scrollwheel: false,
                            draggable: false,
                            mapTypeId: google.maps.MapTypeId.ROADMAP,
                            mapTypeControlOptions: {
                                mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style']
                           }
                        };
                    var map = new google.maps.Map(document.getElementById('map-div'), mapOptions);
                    map.setCenter(results[0].geometry.location);
                    var marker = new google.maps.Marker({
                        map: map,
                        position: results[0].geometry.location,
                        icon: mapsIcon
                    });
                    map.mapTypes.set('map_style', styledMap);
                    map.setMapTypeId('map_style');
                } 
				else {
                    alert("geocode of "+ streetaddress +" failed:"+status);
                }
            });
        } 
		else {
            styledMap       = new google.maps.StyledMapType(MPstyles,{name: "Styled Map"});
            myLatlng        = new google.maps.LatLng(parseFloat(lt),parseFloat(lg));
            var mapOptions  = { 
                                zoom: zoom, 
                                scrollwheel: false,
                                draggable: false,
                                mapTypeId: google.maps.MapTypeId.ROADMAP,
                                center: myLatlng,
                                mapTypeControlOptions: {
                                mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style']
                                }
                            };
            var map         = new google.maps.Map(document.getElementById('map-div'), mapOptions);
            var marker      = new google.maps.Marker({
                                map: map,
                                position: myLatlng,
                                icon: mapsIcon
                            });
            map.mapTypes.set('map_style', styledMap);
            map.setMapTypeId('map_style');
        }
    }
    if ($('#map-drv').length != 0  ) {
        var streetaddress   = $('#map-drv').data('addr'),
            lt              = $('#map-drv').data('lt'),
            lg              = $('#map-drv').data('lg'),
            mapContainer    = document.getElementById("map-drv"),
            dirContainer    = document.getElementById("dir-container"),
            fromInput       = document.getElementById("from-input"),
            toInput         = document.getElementById("to-input"),
            map;
        if ( lt == "" ||  lg == ""){
            geocoder        = new google.maps.Geocoder();
            geocoder.geocode( { 'address': streetaddress}, function(results, status) {
                var mapOptions = { 
                            zoom: 18, 
                            center: results[0].geometry.location,
                            mapTypeId: google.maps.MapTypeId.ROADMAP
                    };
                map = new google.maps.Map(mapContainer, mapOptions);
                var marker = new google.maps.Marker({
                    position: results[0].geometry.location, 
                    map: map
                }); 
                $('#cro_driveclick').click(function() {
                    getDirections();
                }); 
                function getDirections() {
                    var fromStr             = fromInput.value,
                        toStr               = toInput.value,
                        directionsService   = new google.maps.DirectionsService(),
                        directionsDisplay   = new google.maps.DirectionsRenderer(),
                        dirRequest  = {
                            origin: fromStr,
                            destination: toStr,
                            travelMode: google.maps.DirectionsTravelMode.DRIVING,
                            unitSystem: google.maps.DirectionsUnitSystem.METRIC,
                            provideRouteAlternatives: true
                        };
                    directionsService.route(dirRequest, function(result, status) {
                        if (status == google.maps.DirectionsStatus.OK) {
                            directionsDisplay.setDirections(result);
                            directionsDisplay.setPanel(dirContainer);
                            directionsDisplay.setMap(map);
                        }
                    });
                }         
            });
        } 
		else {
            myLatlng        = new google.maps.LatLng(parseFloat(lt),parseFloat(lg));
            geocoder        = new google.maps.Geocoder();
            geocoder.geocode( { 'address': streetaddress}, function(results, status) {
                var mapOptions = { 
                            zoom: 18, 
                            center: myLatlng,
                            mapTypeId: google.maps.MapTypeId.ROADMAP
                    };
                map = new google.maps.Map(mapContainer, mapOptions);
                var marker = new google.maps.Marker({
                    position: myLatlng, 
                    map: map
                }); 
                $('#cro_driveclick').click(function() {
                    getDirections();
                }); 
                function getDirections() {
                    var fromStr             = fromInput.value,
                        toStr               = toInput.value,
                        directionsService   = new google.maps.DirectionsService(),
                        directionsDisplay   = new google.maps.DirectionsRenderer(),
                        dirRequest  = {
                            origin: myLatlng,
                            destination: toStr,
                            travelMode: google.maps.DirectionsTravelMode.DRIVING,
                            unitSystem: google.maps.DirectionsUnitSystem.METRIC,
                            provideRouteAlternatives: true
                        };
                    directionsService.route(dirRequest, function(result, status) {
                        if (status == google.maps.DirectionsStatus.OK) {
                            directionsDisplay.setDirections(result);
                            directionsDisplay.setPanel(dirContainer);
                            directionsDisplay.setMap(map);
                        }
                    });
                }          
            });
        }
    }
    if ($('#map-str').length != 0  ) {
        var lts             = $('#map-str').data('lt'),
            lgs             = $('#map-str').data('lg'),
            azoom           = $('#map-str').data('zoom'),
            orient          = $('#map-str').data('orient'),
            myLatlng        = new google.maps.LatLng(lts,lgs),
            panoramaOptions = {
                                addressControl: false,
                                position: myLatlng,
                                pov: {
                                    heading: orient,
                                    pitch: 0,
                                },
                                zoom: azoom
                            };
        panorama = new  google.maps.StreetViewPanorama(document.getElementById("map-str"), panoramaOptions);
        panorama.setVisible(true);
    }
});